{extend name='public/base'}
{block name='content'}

    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        {$item['item1']}
        <small>{$item['item2']}</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> {$item['item1']}</a></li>
        <li class="active">{$item['item2']}</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">

      <div class="row" >
        <div class="col-xs-12">
          <!-- /.box -->
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">列表</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example1" class="table table-bordered table-hover table-striped">
                <thead>
                <tr>
                  <th>编号</th>
                  <th>账号</th>
                  <th>昵称</th>
                  <th>性别</th>
                  <th>注册时间</th>
                  <th>登录时间</th>                 
                  <th>操作</th>
                </tr>
                </thead>
                <tbody>
                  {volist name='list' id='vo'}
                  <tr style="">
                    <td>{$vo.id}</td>
                    <td>{$vo.tel}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.sex}</td>
                    <td>{$vo.register}</td>
                    <td>{$vo.endtime}</td>
                    <td>
                        <button onclick="lotus_show('用户详情','edit_user.html?id={$vo.id}',800,600)" class="btn btn-xs  btn-success btn-small">查看</button>
                    </td>
                  </tr>
                  {/volist}

                </tbody>

              </table>
              {$list->render()}
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->


{/block}


{block name='script'}
<script>
    //删除用户
    function delete_user(id){
       layer.confirm('真的删除行么', function(index){
            $.ajax({
              url: '{:url("delete_user")}',
              type: 'get',
              dataType: 'json',
              data: {id:id},
          })
          .done(function(data){
              //回调提示
              if(data.code==0){
                      layer.msg(data.msg,{icon:2,time:1000});
                  }else{
                      layer.msg(data.msg,{icon:1,time:1500},function(){
                           location.reload();
                      });
              }
          })


       })

    }



</script>
{/block}